package com.spatio.serving.basic.service.template.server;

import lombok.extern.slf4j.Slf4j;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.context.annotation.PropertySource;
import org.springframework.transaction.annotation.EnableTransactionManagement;

/**
 * @author lei.zhao
 */
@SpringBootApplication(
        scanBasePackages = {
                "com.spatio.serving.basic.service.template",
                "com.spatio.serving.spring.boot.starter"
        }
        //exclude = {DataSourceAutoConfiguration.class}
)
@MapperScan("com.spatio.serving.basic.service.template.*.mapper")
@PropertySource(value = {"classpath:template-core-${spring.profiles.active}.properties"})
@EnableTransactionManagement
@Slf4j
public class TemplateApplication {

        public static void main(String[] args) {
//                Class<?> clazz = TemplateApplication.class;
//                // 获取包名
//                Package pkg = clazz.getPackage();
//                String packageName = pkg.getName();
//                System.out.println("Package Name: " + packageName);
//
//                // 获取完整类名
//                String className = clazz.getName();
//                System.out.println("Class Name: " + className);

                SpringApplication.run(TemplateApplication.class, args);
        }
}
